﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace QLCF.Forms
{
    public partial class popupStockSetPrice : Form
    {
        private frmStockDetail frmTbS1 = null;
        private int stockDetaiID;
        public popupStockSetPrice()
        {
            InitializeComponent();
        }
        public popupStockSetPrice(frmStockDetail m_frmTableService, int m_stockDetailID, string pName, int price)
        {
            InitializeComponent();
            frmTbS1 = m_frmTableService;
            stockDetaiID = m_stockDetailID;
            lblProductName.Text = pName;
            numPrice.Value = price;
        }

        private void btnCancel_Click(object sender, EventArgs e)
        {
            this.Close();
        }

        private void btnOk_Click(object sender, EventArgs e)
        {
            frmTbS1.updatePrice(stockDetaiID, (int)(numPrice.Value));
            this.Close();
        }
    }
}
